﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Ninject;
using Tisonet.Dobrak.Client.WP8.Services;
using Tisonet.Dobrak.Client.WP8.Services.Projections;

namespace Tisonet.Dobrak.Client.WP8.App_Start
{
    public static class IoCContainter
    {
        private static IKernel Kernel;

        public static void Initialize()
        {
            Kernel = new StandardKernel();
         

       // #if DEBUG

            Kernel.Bind<IProjectionsProvider>().To<EmbeddedProjectionsProvider>().WithConstructorArgument("serverUri",   new Uri("http://dobrak.aspone.cz/api/Projections"));
            Kernel.Bind<IProjectionsService>().To<ProjectionsService>();
          


            Kernel.Bind<IMoviesService>().To<MoviesService>().WithConstructorArgument("serverUri", new Uri("http://dobrak.aspone.cz/api/Movies"));
            
          

       // #else
 
         //       Kernel.Bind<ITextDataProvider>().To<ProductionDataProvider>();
 
        //#endif
        }

        public static T Get<T>()
        {
            return Kernel.Get<T>();
        }
    }
}
